﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GoodsEdit.aspx.cs" Inherits="Myproject.BSM.PcWeb.PcChannel.Product.GoodsEdit" ValidateRequest="false" %>

<div class="bjui-pageHeader">
    <div class="bjui-searchBar">
        <ul class="breadcrumb">
            <li><a><i class="fa fa-university"></i>后台管理中心</a></li>
            <li><a><i class="fa fa-desktop"></i>电脑端管理</a></li>
            <li class="active"><a><i class="fa fa-map-signs"></i>产品编辑</a></li>
        </ul>
    </div>
</div>
<div class="bjui-pageContent">
    <form action="/bsm/ashx/PcChannel/GoodsEdit.ashx" id="j_custom_form" data-toggle="validate" data-alertmsg="false">
        <input id="pc_Channel_GoodsEdit_GoodsId" runat="server" name="pc_Channel_GoodsEdit_GoodsId" type="hidden" value="0" />
        <input id="pc_Channel_GoodsEdit_GoodsClassId" runat="server" name="pc_Channel_GoodsEdit_GoodsClassId" type="hidden" value="0" />
        <ul class="nav nav-tabs" role="tablist">
            <li class="active"><a href="#productmessages" role="tab" data-toggle="tab">产品属性</a></li>
            <li><a href="#productcontent" role="tab" data-toggle="tab">产品详情</a></li>
        </ul>
        <div class="tab-content">
            <div class="tab-pane fade active in" id="productmessages">
                <table class="table table-condensed table-hover" width="100%">
                    <tbody>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">名称：</label>
                                <input runat="server"  type="text" name="pc_Channel_GoodsEdit_name" id="pc_Channel_GoodsEdit_name" value="" size="40" maxlength="150" placeholder="名称，100字以内"  data-rule="required">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">别名：</label>
                                <input runat="server"  type="text" name="pc_Channel_GoodsEdit_othername" id="pc_Channel_GoodsEdit_othername" value="" size="40" maxlength="150" placeholder="别名，100字以内" >
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">英文名称：</label>
                                <input runat="server"  type="text" name="pc_Channel_GoodsEdit_ename" id="pc_Channel_GoodsEdit_ename" value="" size="40" maxlength="150" placeholder="英文名称，100字以内">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">产品图片：</label>
                                <div style="display: inline-block; vertical-align: middle;">
                                    <div id="doc_pic_up" data-toggle="upload" data-uploader="/BSM/Ashx/PcChannel/GoodsImg.ashx"
                                        data-file-size-limit="1024000000"
                                        data-file-type-exts="*.jpg;*.png;"
                                        data-multi="true"
                                        data-on-upload-success="pc_channel_Goods_js_success"
                                        data-icon="cloud-upload">
                                    </div>
                                    <input runat="server"  type="hidden" name="doc.pic" value="" id="doc_pic"/>
                                </div>
                                <span runat="server"  id="doc_span_pic"><%=ImgaHtml %></span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label for="j_custom_sale" class="control-label x85">类别：</label>
                                <input runat="server" readonly type="text" name="pc_Channel_GoodsEdit_class" id="pc_Channel_GoodsEdit_class" class="form-control" size="20" data-title="选择类别" data-toggle="lookup" data-url="/bsm/pcweb/PcChannel/Product/selectGoodsclass.aspx"   data-rule="required"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div class="tab-pane fade" id="productcontent" style="height:600px; padding: 0px;">
                <textarea runat="server"  name="pc_Channel_GoodsEdit_text" id="pc_Channel_GoodsEdit_text" runat="server" style="height: 500px; width:90%;"></textarea>
                <script type="text/javascript">
                    var editor = new baidu.editor.ui.Editor({ wordCount: false, elementPathEnabled: false, zIndex: 100 });
                    editor.render('pc_Channel_GoodsEdit_text');
                </script>
                <style>
                    #content div {border: 0px;}
                </style>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">取消</button></li>
        <li>
            <button type="submit" class="btn-green" data-icon="save">保存</button></li>
    </ul>
</div>
<script type="text/javascript">
    function pc_channel_Goods_js_success(file, data) {
        var json = $.parseJSON(data)
        if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
            $('#doc_pic').val(json.fileName);
            $('#doc_span_pic').html('已上传图片：<img src="' + json.fileName + '" width="100">');
        }
    }
</script>
